e3ce19a68f86b00351569766490c57afd7727d9e,app/src/main/java/com/pluscubed/velociraptor/api/SpeedLimitApi.java,SpeedLimitApi,getSpeedLimit,#Location#,117

Before Change



    public Single<ApiResponse> getSpeedLimit(Location location) {
        return SpeedLimitCache.getInstance(mContext).get(mLastOsmRoadNames, new Coord(location))
                .subscribeOn(Schedulers.io())
                .switchIfEmpty(getOsmSpeedLimit(location)
                        //.switchIfEmpty(getHereSpeedLimit(location))
                        .defaultIfEmpty(new ApiResponse()))
                .toSingle();

After Change


        return SpeedLimitCache.getInstance(mContext)
                .get(lastRoadName, new Coord(location))
                .switchIfEmpty(query)
                .doOnNext(apiResponse -> {
                    mLastResponse = apiResponse;
                    if (mLastResponse.timestamp == 0) {
                        mLastResponse.timestamp = System.currentTimeMillis();
                    }
                })
                .toSingle();
    }

    private String getOsmQuery(Location location) {